package com.xuhui.xuaiagent.demo.invoke;

import jakarta.annotation.Resource;
import org.springframework.ai.chat.messages.AssistantMessage;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.chat.prompt.Prompt;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author 21829
 */
@Component
public class SpringAiInvoke {

    @Resource
    private ChatModel dashscopeChatModel;


//    @Override
//    public void run(String... args) throws Exception {
//        AssistantMessage output = dashscopeChatModel.call(new Prompt("你好呀,我是卫永超"))
//                .getResult().getOutput();
//        System.out.println(output.getText());
//    }
}
